Skip to content

Conversation

@wykrrr
Copy link
Contributor

@wykrrr wykrrr commented Jul 10, 2025

This implementation has error:

[2025-07-09T05:32:58Z ERROR cocoindex_engine::execution::source_indexer] JoinError::Panic(Id(33), "Field is already set, violating single-definition rule: KTable({Range(RangeValue { start: 0, end: 5 }): ScopeValueBuilder { fields: [OnceLock(Basic(Str("test1"))), OnceLock(Struct(FieldValues { fields: [Basic(Int64(0)), Basic(Int64(1)), Basic(Int64(1))] })), OnceLock(Struct(FieldValues { fields: [Basic(Int64(5)), Basic(Int64(1)), Basic(Int64(6))] })), OnceLock()] }})", ...)

Please double check.

let content = self.fetch_page_content(page_id.as_ref()).await?;

let fields = vec![
page.id.into(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page ID is the key column, not a value column. Thisget_value() function takes key as input and return value columns. So page ID shouldn't be here.

The error is because fields put here doesn't match output schema returned by get_output_schema() below (for a KTable, first is key column, the remaining are value columns, so the value here is expected to match the remaining columns).

We will need to have validation to check schema of values returned here matching the declared schema (created #735 for this), so such problem can be easily caught and understandable in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants